//
//  CalendarView.h
//  ZhangBen
//
//  Created by tinyfool on 08-10-26.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyClass.h"

@protocol CalendarViewDelegate;

@interface TdCalendarView : UIView {
	CFGregorianDate currentMonthDate;
	CFGregorianDate currentSelectDate;
	CFAbsoluteTime	currentTime;
	UIImageView* viewImageView;
	id<CalendarViewDelegate> calendarViewDelegate;
    NSMutableDictionary *monthFlagArray;
}

@property (nonatomic,retain) NSMutableDictionary *monthFlagArray;

@property CFGregorianDate currentMonthDate;
@property CFGregorianDate currentSelectDate;
@property CFAbsoluteTime  currentTime;

@property (nonatomic, retain) UIImageView* viewImageView;
@property (nonatomic, assign) id<CalendarViewDelegate> calendarViewDelegate;
-(int)getDayCountOfaMonth:(CFGregorianDate)date;
-(int)getMonthWeekday:(CFGregorianDate)date;
-(NSMutableArray*)getDayFlag:(NSString*)day;
-(void)setDayFlag:(NSString*)day flag:(NSMutableArray*)flag;
-(void)clearAllDayFlag;
- (void)movePrevMonth;
- (void)moveNextMonth;
-(NSString*)getStrDate;
-(void)goTaday;
-(NSInteger)getHeight;
-(void)getSchedule;
- (void) movePrevNext:(int)isPrev;
- (void) touchAtDate:(CGPoint) touchPoint;
@end



@protocol CalendarViewDelegate<NSObject>
@optional
- (void) selectDateChanged:(CFGregorianDate) selectDate;
- (void) initDisplayToday;
- (void) monthChanged:(CFGregorianDate) currentMonth viewLeftTop:(CGPoint)viewLeftTop height:(float)height;
- (void) beforeMonthChange:(TdCalendarView*) calendarView willto:(CFGregorianDate) currentMonth;
@end